package com.itheima.wemedia.controller;

import com.itheima.common.vo.ResultVo;
import com.itheima.wemedia.service.WmUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 自媒体登录
 */
@RestController
@RequestMapping("/login")
@Api(value = "LoginController",tags = "自媒体登录")
public class LoginController {
    @Autowired
    private WmUserService wmUserService;

    @ApiOperation(value = "登录接口")
    @PostMapping("/in")
    public ResultVo loginCheck(@RequestBody Map<String,String> loginParam){
        Map<String,Object> resultMap = wmUserService.loginCheck(loginParam);
        return ResultVo.ok(resultMap);
    }

}
